﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ThietBiSo.LinQDB.TinTuc>" %>

<%@ Import Namespace="ThietBiSo.LinQDB" %>
<%@ Import Namespace="ThietBiSo.UrlReview" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Tin tức
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        SEOUrl s = new SEOUrl();
    %>
    <div class="ptvbotronsp">
        <div class="ptvhead_title">
            <h1>
                Tin tức
            </h1>
        </div>
        <table id="results" border="0" width="100%">
            <tr>
                <td>
                    <% foreach (TinTuc item in (List<TinTuc>)ViewData["tintucs"])
                       {               
                    %>
                    <tr>
                        <td align="left" style="padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid #CCCCCC;">
                            <a href="<%:Url.Action("chitiet", "tintuc",new{id=item.MaTinTuc+"_"+s.GenerateURL(item.TieuDe)})%>">
                                <%if (item.UrlHinh == null || item.UrlHinh == "noImage" || item.UrlHinh == "")
                                  { %>
                                <img style="margin-right: 10px; margin-left: 10px;" align="left" width="160" border="0"
                                    src="<%:Url.Content("~/Content/images/nophoto.gif")%>" alt="" height="110px" />
                                <%}
                                  else
                                  { %>
                                <img style="margin-right: 10px; margin-left: 10px;" align="left" width="160" src="<%:item.UrlHinh %>"
                                    alt="" border="0" height="110" /><%} %>
                            </a>
                            <div style="margin-bottom: 5px; color: #195B8E;font-weight:bold; padding: 0 10px 0 10px;">
                                <a href="<%:Url.Action("chitiet", "tintuc",new{id=item.MaTinTuc+"_"+s.GenerateURL(item.TieuDe)})%>">
                                    <%:item.TieuDe %>
                                </a>
                            </div>
                            <div style="text-align: justify; padding: 0 10px 0 10px;">
                                <%: item.NoiDungTomTat%>
                            </div>
                        </td>
                    </tr>
                    <% } %>
                </td>
            </tr>
            <tr>
                <td style="text-align: center; clear: both; width: 100%; padding: 20px 0 10px 0;">
                    <% if ((string)ViewData["pageLinks"] != "")
                       { %>
                    <%= ViewData["pageLinks"] %>
                    <% } %>
                </td>
            </tr>
        </table>
        <div class="ptvclear">
        </div>
    </div>
</asp:Content>
